import Config from '../../config';

var ZHP_Constants = {
  //只有一级
  TAG:{
    ZHP: {key:"ZHP", name:"杂货铺", tag:1},
  },

  SUB_TAG: [{key:1, value:"解忧职场"},
        {key:2, value:"亲子成长"},
        {key:3, value:"情感天地"},
        {key:4, value:"烦心家事"},
      ],

  //根据tag来获得类型数据
  getTypeDataByTag(tag) {
    var name = ""
    switch (tag) {
      case this.TAG.ZHP.tag:
        name = this.TAG.ZHP.name;
        break;
      default:
        name = this.TAG.ZHP.name;
    }
    return name;
  },

  getTypeDataBySubTag(tag) {
    for (var i = 0; i < this.SUB_TAG.length; i++) {
      if(this.SUB_TAG[i].key === tag) {
        return this.SUB_TAG[i].value;
      }
    }
    return "未知类型";
  },
}

module.exports = ZHP_Constants;
